package com.tfswx.jcyw.sqlmodel.api.bean.table.expression;

import com.tfswx.jcyw.sqlmodel.api.bean.table.Expression;
import lombok.Getter;
import lombok.Setter;

/**
 * @author 张述江
 * @date 2023/9/15
 */
@Getter
@Setter
public abstract class BinaryExpression implements Expression {
    private Expression leftExpression;
    private Expression rightExpression;

    public BinaryExpression(Expression left, Expression right) {
        leftExpression = left;
        rightExpression = right;
    }

    public BinaryExpression() {
        this(null, null);
    }

    public abstract String getStringExpression();
    @Override
    public String toString() {
        return getLeftExpression() + " " + getStringExpression() + " " + getRightExpression();
    }
}
